<?php
function html_select($opt,$value = '0',$attr='',$title = ''){
	?>
	<select <?php echo $attr;?> >
	<?php 
	if(!empty($title)){
		?>
		<option value="10000"><?php echo $title;?></option>
		<?php 
	}

	foreach ($opt as $k=>$v){
		?>
		<option <?php echo $k == $value ? ' selected="selected" ' : ''?> value="<?php echo $k;?>"><?php echo $v;?></option>
		<?php 
	}		
	?>
	</select>
	<?php 
}

function html_img($src,$attr = ''){
	$base_url = config_item('base_url');
	$img_url = $base_url.'site/statics/img/';
	$src = $img_url.$src;
	?>
	<img <?php echo $attr;?> src="<?php echo $src;?>"/>
	<?php 
}

function html_css($src){
	$base_url = config_item('base_url');
	$css_url = $base_url.'site/statics/css/';
	$src = $css_url.$src;
	?>
	<link href="<?php echo $src;?>" type="text/css" rel="stylesheet">
	<?php 
	
}


function html_js($src){
	$base_url = config_item('base_url');
	$js_url = $base_url.'site/statics/js/';
	$src = $js_url.$src;
	?>
	<script src="<?php echo $src;?>"></script>
	<?php 
	
}

function html_jscss($src){
	$base_url = config_item('base_url');
	$css_url = $base_url.'site/statics/js/';
	$src = $css_url.$src;
	?>
	<link href="<?php echo $src;?>" type="text/css" rel="stylesheet">
	<?php 
}

